import { stringify } from 'qs';
import request from '@/utils/request';

import webpath from '@/utils/webpath';

export async function deleteByPrimaryKeyForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/get?${stringify(params)}`);
}


export async function insertForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/insert`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/update`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/deleteByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/updateByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/getOne`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/count`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/insertBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/updateBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}